package cn.iocoder.yudao.module.reading.controller.app.recordings.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户配音详情页响应 VO
 * 包含指定绘本的所有页面配音信息
 *
 * @author 李晨
 */
@Schema(description = "用户配音详情页响应 VO")
@Data
public class UserRecordingDetailPageRespVO {

    @Schema(description = "绘本ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    private Long bookId;

    @Schema(description = "绘本标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "Fun at the Beach")
    private String bookTitle;

    @Schema(description = "封面URL", example = "https://example.com/cover.jpg")
    private String coverUrl;

    @Schema(description = "绘本总页数", example = "10")
    private Integer totalPages;

    @Schema(description = "已配音页数", example = "5")
    private Integer recordedPages;

    @Schema(description = "配音完成度百分比", example = "50")
    private Integer completionPercentage;

    @Schema(description = "是否全部可分享", example = "true")
    private Boolean allShareable;

    @Schema(description = "页面配音列表")
    private List<PageRecordingVO> pageRecordings;

    /**
     * 页面配音信息
     */
    @Schema(description = "页面配音信息")
    @Data
    public static class PageRecordingVO {
        
        @Schema(description = "页面ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long pageId;

        @Schema(description = "页码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Integer pageNumber;

        @Schema(description = "页面图片URL", example = "https://example.com/page1.jpg")
        private String imageUrl;

        @Schema(description = "页面文字内容", example = "This is a school.")
        private String textContent;

        @Schema(description = "是否有配音", example = "true")
        private Boolean hasRecording;

        @Schema(description = "配音记录ID", example = "1")
        private Long recordingId;

        @Schema(description = "配音文件URL", example = "https://example.com/recording.mp3")
        private String audioUrl;

        @Schema(description = "配音时长（秒）", example = "30")
        private Integer duration;

        @Schema(description = "格式化时长", example = "00:30")
        private String formattedDuration;

        @Schema(description = "评分", example = "85")
        private Integer score;

        @Schema(description = "是否可分享", example = "true")
        private Boolean isShareable;

        @Schema(description = "录制时间")
        private LocalDateTime recordTime;

        @Schema(description = "录音质量", example = "medium")
        private String recordingQuality;
    }

}
